feat: enhance opportunityMatches query with status filtering and total count#3328
feat: enhance opportunityMatches query with status filtering and total count#3328
Conversation
idoshamun
commented
Dec 8, 2025
- Added optional status filter to the opportunityMatches query.
- Updated OpportunityMatchConnection to include totalCount for matches.
…l count - Added optional status filter to the opportunityMatches query. - Updated OpportunityMatchConnection to include totalCount for matches.
|
🍹 The Update (preview) for dailydotdev/api/prod (at 10c3211) was successful. Resource Changes Name Type Operation
~ vpc-native-post-analytics-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-tags-str-cron kubernetes:batch/v1:CronJob update
~ vpc-native-personalized-digest-deployment kubernetes:apps/v1:Deployment update
- vpc-native-api-db-migration-023eb320 kubernetes:batch/v1:Job delete
~ vpc-native-update-tag-recommendations-cron kubernetes:batch/v1:CronJob update
~ vpc-native-validate-active-users-cron kubernetes:batch/v1:CronJob update
~ vpc-native-generate-search-invites-cron kubernetes:batch/v1:CronJob update
~ vpc-native-private-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-hourly-notification-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-images-cron kubernetes:batch/v1:CronJob update
~ vpc-native-user-profile-updated-sync-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-current-streak-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-generic-referral-reminder-cron kubernetes:batch/v1:CronJob update
~ vpc-native-post-analytics-history-day-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-trending-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-user-companies-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-source-tag-view-cron kubernetes:batch/v1:CronJob update
~ vpc-native-daily-digest-cron kubernetes:batch/v1:CronJob update
~ vpc-native-personalized-digest-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-gifted-plus-cron kubernetes:batch/v1:CronJob update
~ vpc-native-ws-deployment kubernetes:apps/v1:Deployment update
+ vpc-native-api-clickhouse-migration-fb0478f2 kubernetes:batch/v1:Job create
+ vpc-native-api-db-migration-fb0478f2 kubernetes:batch/v1:Job create
~ vpc-native-clean-stale-user-transactions-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-source-public-threshold-cron kubernetes:batch/v1:CronJob update
~ vpc-native-bg-deployment kubernetes:apps/v1:Deployment update
- vpc-native-api-clickhouse-migration-023eb320 kubernetes:batch/v1:Job delete
~ vpc-native-clean-zombie-opportunities-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-users-cron kubernetes:batch/v1:CronJob update
~ vpc-native-check-analytics-report-cron kubernetes:batch/v1:CronJob update
~ vpc-native-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-calculate-top-readers-cron kubernetes:batch/v1:CronJob update
~ vpc-native-sync-subscription-with-cio-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-highlighted-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-temporal-deployment kubernetes:apps/v1:Deployment update
|
| ]; | ||
|
|
||
| // Validate status if provided | ||
| if (args.status && !allowedStatuses.includes(args.status)) { |
There was a problem hiding this comment.
We usually validate payloads with zod parse now, much better and throws structured error to frontend as well.
There was a problem hiding this comment.
I'll look for an example 🫡
There was a problem hiding this comment.
look at editOpportunity mutation in this same file
| const statusesToFilter = args.status ? [args.status] : allowedStatuses; | ||
|
|
||
| const [connection, totalCount] = await Promise.all([ | ||
| queryPaginatedByDate<GQLOpportunityMatch, 'updatedAt', typeof args>( |
There was a problem hiding this comment.
Is this now used for tinder style matching? Do we want to make sure user can't browse multiple candidates if doing direct API requests and requesting more candidates, and only do one by one? (could be something we add later, just for shenanigans protection) 😆
There was a problem hiding this comment.
I don't think we should be strict to actually protected from it. But we also have couple use cases where we actually show a list, not just one by one. so it's better to support it this way
There was a problem hiding this comment.
Where do we show it as list? (just for my own reference)
There was a problem hiding this comment.
maybe it doesn't exist at the moment, but i know we plan to show recruiter approved/rejected candidates